{extend name="layout/index" /}
{block name="title"}
<title>修改视频</title>
{/block}
{block name="adminUser"}
<a href="#" data-toggle="dropdown">
	<img src="/admin/images/user-4.png" alt="user-image" class="img-circle img-inline userpic-32" width="28" />
	<span>
		{$adminUser}
		<i class="fa-angle-down"></i>
	</span>
</a>
{/block}
{block name="content"}
		<div class="panel panel-default">
						<div class="panel-heading">
							<h3 class="panel-title">修改视频</h3>
							<div class="panel-options">
								<a href="#" data-toggle="panel">
									<span class="collapse-icon">&ndash;</span>
									<span class="expand-icon">+</span>
								</a>
								<a href="#" data-toggle="remove">
									×
								</a>
							</div>
						</div>
						<div class="panel-body">
							
							<form action="{:url('admin/doVideoEdit')}" method="post" enctype="multipart/form-data" role="form" class="form-horizontal">
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="field-1">视频标题</label>
									
									<div class="col-sm-10">
										<input class="form-control" id="field-1" placeholder="输入视频标题" type="text" name="video_name" value="{$video.video_name}">
									</div>
								</div>								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="field-4">缩略图</label>
									
									<div class="col-sm-10">
										<input class="form-control" id="field-4" type="file" name="video_zip">
									</div>
								</div>

									<div class="form-group-separator"></div>

								<div class="form-group">
									<label class="col-sm-2 control-label" for="field-4">视频</label>
									
									<div class="col-sm-10">
										<input class="form-control" id="field-4" type="file" name="video">
									</div>
								</div>
								

							
								
								<div class="form-group-separator"></div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="field-5">视频描述</label>
									
									<div class="col-sm-10">
										<textarea name="video_describe" value="{$video.video_describe}" class="form-control autogrow" cols="5" id="field-5" placeholder="" style="overflow: hidden; overflow-wrap: break-word; resize: horizontal;  height: 68px;"></textarea>
									</div>
								</div>

									<div class="form-group-separator"></div>

								 <div class="form-group">
									<label class="col-sm-2 control-label">是否付费</label>
										<div class="col-sm-10">
										<select name="video_style" class="form-control">
											<option selected value="0">--请选择--</option>
											<option {if condition="$video.video_style == 1"} selected  {/if} value="1">--免费--</option>
											<option {if condition="$video.video_style == 2"} selected  {/if} value="2">--付费--</option>
											<option {if condition="$video.video_style == 3"} selected  {/if} value="3">--积分--</option>
										</select>
									</div>
									
								</div>	
								
								<div class="form-group video_price">
									<label class="col-sm-2 control-label">视频价格</label>									
									<div class="col-sm-10 " >
										<div class="input-group">
											<span class="input-group-addon">$</span>
											<input class="form-control" vlaue="" type="text" name="video_price" value="{$video.video_price}">
											<span class="input-group-addon">.00</span>
										</div>
									</div>
								</div>
								<div class="form-group video_jifen">
									<label class="col-sm-2 control-label">视频积分</label>									
									<div class="col-sm-10 " >
										<div class="input-group">
											
											<input class="form-control" vlaue="" type="text" name="video_jifen">										
										</div>
									</div>
								</div>


								<div class="form-group-separator"></div>
								<input type="hidden" name="id" value="{$video.id}">
								<input type="submit" value="点击修改" class="btn btn-info btn-single pull-right"/>
							</form> 
							
						</div>
					</div>

{/block}

{block name="css"}


{/block}

{block name="js"}
<script type="text/javascript">
$('select[name=video_style]').change(function(){
	var v = $(this).val();	
	if(v == 2){
		$('.video_price').css('display','block');
	}else{
		$('.video_price').css('display','none');
	}
	if(v == 3){
		$('.video_jifen').css('display','block');
	}else{
		$('.video_jifen').css('display','none');
	}
})
</script>
{/block}
